﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;
using System.Windows;

namespace ImageConverter.Converters
{
    public class Win7TaskBarProgressConverter : IValueConverter
    {
        public double MinProgressValue { get; set; }

        public double MaxProgressValue { get; set; }

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            double dValue = (double)value;
            return dValue / Math.Abs(MaxProgressValue - MinProgressValue);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
